package com.runfast.waimai.service.impl;

import com.runfast.common.service.BaseService;
import com.runfast.waimai.service.RunfastBusinessDailyService;
import com.runfast.waimai.dao.mapper.RunfastBusinessDailyMapper;
import com.runfast.waimai.dao.model.RunfastBusinessDaily;
import com.runfast.waimai.dao.model.RunfastBusinessDailyExample;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class RunfastBusinessDailyServiceImpl extends BaseService<RunfastBusinessDaily, Integer, RunfastBusinessDailyExample> implements RunfastBusinessDailyService {
    @Override
    public Map<String, Object> getStats(RunfastBusinessDailyExample example) {
        return ((RunfastBusinessDailyMapper)mapper).getStats(example);
    }

    @Override
    public List<Map<String, Object>> getTopList(RunfastBusinessDailyExample yesterdayExample) {
        return ((RunfastBusinessDailyMapper)mapper).getTopList(yesterdayExample);
    }

    @Override
    public Integer countNoOrdersInThree(RunfastBusinessDailyExample yesterdayExample) {
        return ((RunfastBusinessDailyMapper)mapper).countNoOrdersInThree(yesterdayExample);
    }

    @Override
    public Map<String, Object> countByExampleWithPageableGroupByBusinessId(RunfastBusinessDailyExample example, Pageable pageable) {
        return ((RunfastBusinessDailyMapper)mapper).countByExampleWithPageableGroupByBusinessId(example,pageable);
    }

    @Override
    public RunfastBusinessDaily sumByExample(RunfastBusinessDailyExample example) {
        return ((RunfastBusinessDailyMapper)mapper).sumByExample(example);
    }
}